473,461 Members | 1,538 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

forms: img submit button: can u do rollovers??


I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:

<input type="image" name="log" src="images/login.gif" value="Submit"
alt="Submit"
onMouseover = "log.src='images/login-roll.gif'"
onMouseout ="images/log.src='login.gif'">

thank you..

Frances

Jul 23 '05 #1
2 8035


Frances Del Rio wrote:

I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:

<input type="image" name="log" src="images/login.gif" value="Submit"
alt="Submit"
onMouseover = "log.src='images/login-roll.gif'"
onMouseout ="images/log.src='login.gif'">


Try
<input type="image"
src="images/login.gif"
onmouseover="this.src = 'images/login-roll.gif';"
onmouseout="this.src = 'images/login.gif';"
alt="submit"
value="submit">
with modern browsers like IE5+, Netscape 6/7, Mozilla, Opera 7 I expect
that to work as intended, only old ones like Netscape 4 do not support
onmouseover/out for the input element.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2

Martin Honnen wrote:


Frances Del Rio wrote:

I have a form in which submit button is an img.. would like to do it
w/a rollover, but can't get rollover to work.. can you do rollovers
w/img submit buttons? this is code I have:

<input type="image" name="log" src="images/login.gif" value="Submit"
alt="Submit"
onMouseover = "log.src='images/login-roll.gif'"
onMouseout ="images/log.src='login.gif'">

Try
<input type="image"
src="images/login.gif"
onmouseover="this.src = 'images/login-roll.gif';"
onmouseout="this.src = 'images/login.gif';"
alt="submit"
value="submit">
with modern browsers like IE5+, Netscape 6/7, Mozilla, Opera 7 I expect
that to work as intended, only old ones like Netscape 4 do not support
onmouseover/out for the input element.


thank you!! that worked!!

Frances


Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: sumithradevi | last post by:
Hello Friends, I have two forms(form1 and form2) on my html page. question1 : can i access form 1 variables in form 2?. if so how? question 2: when form2 action is saveci.jsp . can i access...
65
by: SamMan | last post by:
A question came up at work from one of our clients about forms on their site. The data from these forms are processed by a PHP script and if all goes well, a thank you screen appears. Sometimes,...
3
by: brett | last post by:
Using DOM in IE, how can I loop through FORMs and access FORM elements in a specific form? For example, www.hotmail.com has about 13 forms. I believe the one displayed is dependent on the URL. If...
1
by: Frances Del Rio | last post by:
I have a form in which submit button is an img.. would like to do it w/a rollover, but can't get rollover to work.. can you do rollovers w/img submit buttons? this is code I have: <input...
6
by: milkyway | last post by:
Hello there, I have the following code (written in Javascript) for posting of a form on the client side: .... var f2 = document.forms; f2.method = "post"; f2.submit();
5
by: c676228 | last post by:
Hi everyone, my colleagues are thinking about have three insurance plans on one asp page: I simplify the plan as follow: text box:number of people plan1 plan2 plan3
1
by: miguel | last post by:
Hello I would like to know if it is possible submit two html forms with only one button. I am working with JSF and the generated html code has two forms, I have one submit button out these forms and...
23
by: mosesdinakaran | last post by:
Hi All, I need a small clarification in submitting the forms, Ur suggestions please. In a page I have two form and also two submit butons. (ie)
19
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.